import {request} from "./request";

//一对一  小程序在线咨询 -专家数据
export const expertList  = (data) => request({
	url:'/expert/busExpertManagement/list',
	method:'get',
	data
})

//一对一详情   专家注册信息通过id 查询
export const queryById = (id) => request({
	url:`/expert/busExpertManagement/queryById?consultantId=${id}`,
	method:'get',
})

// 在线预约   小程序在线咨询  添加 
export const  Add = (data) => request({
	url:'/bconsult/busConsult/add',
	method:'post',
	data
})

//在线咨询取消 -- 撤销申请
export const busConsultdel = (id) => request({
	url:`/bconsult/busConsult/delete?id=${id}`,
	method:'delete'
})
//在线咨询 检查专家是否在线
export const checkConsultOnline = (userId) => request({
	url:`/userAuthorization/userAuthorization/verify?userId=${userId}`,
	method:'get'
})
// 在线咨询 专家上线
export const consultOnline = (userId) => request({
	url:`/userAuthorization/userAuthorization/online?userId=${userId}`,
	method:'get'
})



//咨询人数据
export const userlist = (data) => request({
	url:'/bconsult/busConsult/userList',
	method:'get',
	data
})

// 帖子数据  
export const  postList = (id,postState,pageNo) => request({
   url:`/expert/busExpertManagement/postList?id=${id}&postState=${postState}&pageNo=${pageNo}`,
   method:'get',
})

// 帖子草稿箱
export const drafts = (id,postState,pageNo) => request({
	url:`/post/postInformation/homePagePostList?userId=${id}&postState=${postState}&pageNo=${pageNo}`
})

// 评价 
export const  busExpertAppraiseadd = (data) => request({
	url:'/appraise/busExpertAppraise/add',
	method:'post',
	data
})

// 评价词
 export const  vocabularyList  = (data) => request({
	 url:'/appraise/busExpertAppraise/vocabularyList',
	 method:'get',
	 data
 })
 
 ////////////////////// 我的 ///////////////////////
 //我的档案
 export const userDetails = (data) => request({
	 url:'/userDetails/userDetails/list',
	 method:'get',
	 data
 })
 
 // 我的档案删除
 export const  userDetailsdel = (id,headPortrait) => request({
	 url:`/userDetails/userDetails/delete?id=${id}`,
	 method:'delete',
 })

// 我的档案编辑 
export const  userDetailsedit = (data) => request({
	url:'/userDetails/userDetails/edit',
	method:'post',
	data
})


// 草稿删除
export const  Informationdel = (id) => request({
	url:`/post/postInformation/delete?id=${id}`,
	method:'delete'
})

// 测字记录 
export const  glyphomancylist = (userId,pageNo) => request({
    url:`/glyphomancy/list?userId=${userId}&pageNo=${pageNo}`,
	method:'get'
})

//浏览记录
export const   userBrowsePostInformations = (userId,pageNo) => request({
	url:`/post/postInformation/userBrowsePostInformations?userId=${userId}&pageNo=${pageNo}`,
	method:'get'
})

//浏览记录删除  
export const browsingHistorydel = (id) => request({
	url:`/browsingHistory/browsingHistory/delete?id=${id}`,
	method:'delete'
})

// 浏览记录批量删除
export const  browsingHistorydels = (ids) => request({
	url:`/browsingHistory/browsingHistory/deleteBatch?ids=${ids}`,
	method:'delete'
})

// 起名列表
export const getRecordListAPI = (userId,pageNo) => request({
	url: `/nameChild/list/?userId=${userId}&pageNo=${pageNo}`,
	method: 'get'
}); 

// 签到记录-签到信息
export const busSignDetailsqueryById = (data) => request({
	url:'/sign/busSignDetails/queryById',
	method:'get',
	data
})

// 签到记录-签到
export const  busSignDetailsadd = (data) => request({
	url:`/sign/busSignDetails/add`,
	method:'post',
	data
})

// 获取他币数量
export const busSignRulelist = (data) => request({
	url:`/signrule/busSignRule/list`,
	method:'get',
	data
})



// 咨询订单-我的订单
export const  myOrderList = (data) => request({
	url:`/paymentOrderInfo/paymentOrderInfo/queryUserOrderList`,
	method:'get',
	data
})

// 咨询订单-我的订单
export const  orderDetail = (id) => request({
	url:`/paymentOrderInfo/paymentOrderInfo/queryById?id=${id}`,
	method:'get'
})

// 咨询订单-检查本人是否存在未支付订单
export const  checkPendingOrder = () => request({
	url:`/paymentOrderInfo/paymentOrderInfo/queryUserPendingOrder`,
	method:'get'
})

// 咨询订单-确认支付
export const  completeOrder = (id) => request({
	url:`/paymentOrderInfo/paymentOrderInfo/confirmPayment?id=${id}`,
	method:'get'
})


// 他币充值信息 
export const busCoinsppList = () => request({
	url:'/coins/busCoins/appList',
	method:'get'
})

// 他币自定义充值信息
export const busCoinscustomize = (data) => request({
	url:'/coins/busCoins/customize',
	method:'post',
	data:data
})

//获取专家审核状态
export const queryByIdExpertManagement = (id) => request({
	url:`/expert/busExpertManagement/queryByIdExpertManagement?expertId=${id}`,
	method:'get'
})
